-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨(mailboxes) link mailbox creation to dimail-api #261
Conversation
4baef67
to
7bdd1d4
Compare
309725b
to
635a9d7
Compare
affcaf6
to
1e34d32
Compare
total=4, | ||
backoff_factor=0.1, | ||
status_forcelist=[500, 502], | ||
allowed_methods=["PATCH"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why PATCH? Because of idempotency? Shouldn't we retry on a "GET" too?
Also, why would you retry on a 500?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's now in the utils
folder but the question remains whole.
c03a748
to
26924bb
Compare
c4a3b50
to
0f74a64
Compare
0f74a64
to
3ee11d3
Compare
ac18d1e
to
2c2a921
Compare
if response.status_code == 201: | ||
extra = { | ||
"response": response.content.decode("utf-8") | ||
} # Log mailbox info (including password !) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on log le password ? c'est pas une bonne chose ça non ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En fait, je sais pas quoi faire de ce password pour l'instant. On avait mentionné que ce serait OX qui l'envoyait mais on s'est pas encore capté pour définir la brique et potentiellement la faire avec eux.
Comme je suis pas trop sûre de comment on envoie des mails et de si on est en capacité d'envoyer des mails avec la Régie maintenant, j'ai fait ce hack dégueu pour les démos mais j'avoue c'est pas trop prod-ready.
2c2a921
to
732962e
Compare
@classmethod | ||
def _create(cls, model_class, *args, use_mock=True, **kwargs): | ||
domain = kwargs["domain"] | ||
if use_mock and isinstance(domain, models.MailDomain): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est un peu étrange ce que je suis obligée de faire pour que les tests qui concernent la création de boite mail sans mail domaine fonctionnent. Ya un truc qui me chiffonne avec ces tests. À discuter tranquillement.
@mjeammet
30adcd1
to
72ece30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOLO !!!!
add a "secret" field to domain model. This secret will be used as password in mail provisioning API.
We want people to create new mailboxes in La Régie. This commit adds integration with intermediary dimail-api, which will in turn send our email creation request to Open-Xchange.
Test that API raises a 404 when trying to list mailboxes of a domain that does not exist.
- manage 403 returned by dimail API when mail domain secret is not valid - improve some tests - improve MailboxFactory to mock success for dimail API POST call - override 403.html to return a nice failing error in django admin - an error message is displayed on mailbox creation form of frontend
555f07a
to
a20eb99
Compare
Purpose
We want to link la Régie to the API provising our OpenExchange server (dimail-api)
Proposal